
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type WechatUserRequest struct {

	Uid string `json:"uid" form:"uid"`

	Unionid string `json:"unionid" form:"unionid"`

	Openid string `json:"openid" form:"openid"`

	Nickname string `json:"nickname" form:"nickname"`

	Headimgurl string `json:"headimgurl" form:"headimgurl"`

	Sex string `json:"sex" form:"sex"`

	City string `json:"city" form:"city"`

	Language string `json:"language" form:"language"`

	Province string `json:"province" form:"province"`

	Country string `json:"country" form:"country"`

	Remark string `json:"remark" form:"remark"`

	Groupid string `json:"groupid" form:"groupid"`

	TagidList string `json:"tagid_list" form:"tagid_list"`

	Subscribe string `json:"subscribe" form:"subscribe"`

	SubscribeTime string `json:"subscribe_time" form:"subscribe_time"`

	AddTime string `json:"add_time" form:"add_time"`

	Second string `json:"second" form:"second"`

	UserType string `json:"user_type" form:"user_type"`

	IsComplete string `json:"is_complete" form:"is_complete"`

	IsDel string `json:"is_del" form:"is_del"`

}

func (r *WechatUserRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *WechatUserRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"uid": "required",

		"unionid": "required",

		"openid": "required",

		"nickname": "required",

		"headimgurl": "required",

		"sex": "required",

		"city": "required",

		"language": "required",

		"province": "required",

		"country": "required",

		"remark": "required",

		"groupid": "required",

		"tagid_list": "required",

		"subscribe": "required",

		"subscribe_time": "required",

		"add_time": "required",

		"second": "required",

		"user_type": "required",

		"is_complete": "required",

		"is_del": "required",

	}
}

func (r *WechatUserRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *WechatUserRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *WechatUserRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
